package com.jxk.test.listener;

import com.jxk.test.event.MyEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

/**
 * @ClassName : HandlerEvent  //类名
 * @Description :   //描述
 * @Author : jxk  //作者
 * @Date: 2020-10-10 11:15  //时间
 */
@Component
//注解式
public class HandlerEvent {
    @EventListener
    public void evendListener(MyEvent event){
        System.out.println("监听了-----"+event.getSource());
        System.out.println("监听了-----"+event.getClass());
    }

}
